import { _window } from '@/global'
import { defineStore } from 'pinia'

const UserStore = defineStore('UserStore', {
  state: () => ({
    name: '',
    avatar: '',
    email: '',
    exp: _window.localStorage.getItem('exp') || 0,
  }),
  getters: {
    userInfo: _state => ({
      avatar: 'https://avatars.githubusercontent.com/u/87603006?v=4',
      name: 'Yotomum_ml',
    }),
    isLogin: _state => true,
  },
  actions: {},
})

export default UserStore
